﻿@using System.Data
@{
    ViewBag.Title = "我的评价";
    Layout = "~/Areas/Mall/Views/Shared/MallLayout1.cshtml";
}
<div class="title_t">
    我的评价
</div>
<div class="baseclass" style="font-size: 12px;">

</div>

<div style="width: 100%;height: 80px;"></div>
<script>
    var pagecount = 5;
    var pagenum = 0;
    var sid = "@ViewData["id"]";

    $(window).scroll(function() {
        if ($(document).scrollTop() + $(window).height() >= $(document).height()) {
            pagenum += 1;
            getlist();
        }
    });
    $(function() {
        getlist();
    });
    function getlist() {
        $.post("@Url.Action("Pjlist")", { pageCount: pagecount, pageIndex: pagenum * pagecount }, function (data) {
            var obj = JSON.parse(data);
            var str = "";
            for (var i = 0; i < obj.data.length; i++) {
                var item = obj.data[i];
                
                str += i==0?"":"<div class=\"redline\"></div>";
                str += "<div class=\"baseclass\" style=\"font-size: 12px;\">" +
                    "<div>" + item.GoodsName + "</div>" +
                    "<div>" + item.Text + "</div>" +
                    "<div>";
               
                str += item.Img1 == "" ? "" : "<img src=\"" + item.Img1 + "\" width=\"50\" height=\"50\" style=\"margin-left:5px;\"/>";
                str += item.Img2 == "" ? "" : "<img src=\"" + item.Img2 + "\" width=\"50\" height=\"50\" style=\"margin-left:5px;\"/>";
                str += item.Img3 == "" ? "" : "<img src=\"" + item.Img3 + "\" width=\"50\" height=\"50\" style=\"margin-left:5px;\"/>";

                  str+=  "</div>" +
                    "<div>";
                for (var j = 0; j < item.Rnk; j++) {
                    str += "<img src=\"/Images/redx.png\" width='25'/>";
                }

                str+="</div>" +
                        "<div style=\"float: right;\">"+item.Date.substring(0,10)+"</div>"+
                        "</div>";
               
            }
            $(".baseclass").append(str);
        });
    }

</script>